package com.chat.exception;

import com.chat.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class GloablHandlerException {

    @ExceptionHandler
    public Result doException(Exception e) {
        log.error(e.getMessage());
        return Result.error("出差了，请联系管理员！！！");
    }
}
